<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>

<body>
    <div>
        <div id="app">
            <div>{{arr}}</div>
            <div><button @click="changeArr">按钮</button></div>
        </div>
       
    </div>
    <script>
        let vm = new Vue({
            el: "#app",
            data: {
                user: { a: 1 },
                arr: [1, 2, 3],
            },
            methods: {
                changeArr() {
                    //set(要修改的数组,修改的索引下标,修改的值)
                    this.$set(this.arr, 1, 99)
                },

            }
        })
    </script>
</body>

</html>